package org.tloss;

import java.io.Serializable;

public class SolutionPath implements Serializable{
	private SolutionPath pre;
	private SolutionPath next;
	private Status status;

	public SolutionPath() {
		pre = null;
		next = null;
	}

	public SolutionPath getPre() {
		return pre;
	}

	public void setPre(SolutionPath pre) {
		this.pre = pre;
	}

	public SolutionPath getNext() {
		return next;
	}

	public void setNext(SolutionPath next) {
		this.next = next;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	protected Object clone() throws CloneNotSupportedException {
		SolutionPath path = new SolutionPath();
		SolutionPath tmp =  pre;
		SolutionPath clone =  path;
		while (tmp != null) {
			clone.pre = new SolutionPath();
			clone.pre.status =(Status) tmp.status.clone();
			clone.pre.next =  clone;
			tmp =  tmp.pre;
			clone =  clone.pre;
		} 
		tmp =  next;
		clone = path;
		while (tmp != null) {
			clone.next = new SolutionPath();
			clone.next.status =(Status) tmp.status.clone();
			clone.next.pre =  clone;
			tmp =  tmp.next;
			clone =  clone.next;
		} 
		path.status = (Status) status.clone();
		return path;
	}
}

